<div>
  <div class="poll-container">
    {{#if showingResults}}
      {{#if isNumber}}
        {{poll-results-number isPublic=isPublic poll=poll}}
      {{else}}
        {{poll-results-standard isPublic=isPublic poll=poll}}
      {{/if}}
    {{else}}
      <ul>
        {{#each poll.options as |option|}}
          {{poll-option option=option toggle="toggleOption" isMultiple=isMultiple}}
        {{/each}}
      </ul>
    {{/if}}
  </div>
  <div class="poll-info">
    <p>
      <span class="info-number">{{poll.voters}}</span>
      <span class="info-text">{{votersText}}</span>
    </p>
    {{#if isMultiple}}
      {{#if showingResults}}
        <p>
          <span class="info-number">{{totalVotes}}</span>
          <span class="info-text">{{totalVotesText}}</span>
        </p>
      {{else}}
        <p>{{{multipleHelpText}}}</p>
      {{/if}}
    {{/if}}

    {{#if isPublic}}
      {{#unless showingResults}}
        <p>{{i18n "poll.public.title"}}</p>
      {{/unless}}
    {{/if}}
  </div>
</div>

<div class="poll-buttons">
  {{#if isMultiple}}
    {{#unless hideResultsDisabled}}
      {{d-button class=castVotesButtonClass title="poll.cast-votes.title" label="poll.cast-votes.label" disabled=castVotesDisabled action="castVotes"}}
    {{/unless}}
  {{/if}}

  {{#if showingResults}}
    {{d-button class="toggle-results" title="poll.hide-results.title" label="poll.hide-results.label" icon="eye-slash" disabled=hideResultsDisabled action="toggleResults"}}
  {{else}}
    {{d-button class="toggle-results" title="poll.show-results.title" label="poll.show-results.label" icon="eye" disabled=showResultsDisabled action="toggleResults"}}
  {{/if}}

  {{#if canToggleStatus}}
    {{#if isClosed}}
      {{d-button class="toggle-status" title="poll.open.title" label="poll.open.label" icon="unlock-alt" action="toggleStatus"}}
    {{else}}
      {{d-button class="toggle-status btn-danger" title="poll.close.title" label="poll.close.label" icon="lock" action="toggleStatus"}}
    {{/if}}
  {{/if}}
</div>
